-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flag to ls to not resolve type of subnodes #2824
Conversation
I don't like this, it can silently provide misleading information. I think that we could move the type query under a flag (or have a flag to disable it). |
As it is an int, maybe I will make it |
How does it look now? |
@Kubuxu I just don't like the possiblity of returning partial data. It feels kinda wrong to me... |
Then IMO we should remove this from API completely (maybe only with special flag), as it has quite high drawback for such small benefit in usual use case (someone doing |
Yeah, thats what i meant by moving the type query under a flag. |
b9f4952
to
3972d99
Compare
@whyrusleeping what is the correct way to getting a object if and only if it is local? |
@Kubuxu use the blockstore (not blockservice) directly. Or construct a new dagservice with an 'offline' exchange |
Add option to resolve type using ls but set it to false by default. License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
Ok, now it doesn't resolve the subnode data unless the data is available locally. @RichardLitt this changes API. |
@Kubuxu i'd like this to default to true, so we maintain compatibility with our existing behaviour |
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
Done |
@Kubuxu How do I use |
res.SetError(err, cmds.ErrNormal) | ||
return | ||
} | ||
linkNode, err = merkledag.DecodeProtobuf(b.Data()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok wat-- all this merkledag code shouldnt have to be out here. this should all be handled by util functions in either unixfs
or some other package. this is leaking abstractions out
This makes ls return even if files referenced in the directory are not available.
It also introduces a
resolve-type
flag that forces the resolution of type.Resolves #2820
License: MIT
Signed-off-by: Jakub Sztandera [email protected]